home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_item_raidersidol.cog < prev    next >
Text File  |  1999-11-15  |  904b  |  59 lines

  1. # Jones 3D Cog Script
  2. #
  3. # item_RaidersIdol.cog
  4. #
  5. # [RT]
  6. #
  7. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ===================================================================
  10.  
  11. symbols
  12.  
  13. message    touched
  14. message taken
  15.  
  16. thing   player              local
  17.                 
  18. int        treasureBin=36    local
  19. int        coinBin=80          local
  20. int        value=500          local
  21.  
  22. end
  23.  
  24. # ===================================================================
  25.  
  26. code
  27.  
  28. touched:
  29.  
  30.     player = GetSourceRef();
  31.     
  32.     if (GetInv(player, treasureBin) < GetInvMax(player, treasureBin))
  33.     {
  34.         TakeItem(GetSenderRef(), player);
  35.     }
  36.  
  37.     return;
  38.  
  39. # -------------------------------------------------------------------
  40.  
  41. taken:
  42.  
  43.     player = GetSourceRef();
  44.     
  45.     ChangeInv(player, treasureBin, value);
  46.     SetInvAvailable(player, treasureBin, 1);
  47.     JonesInvItemChanged(coinBin);
  48.     
  49.     return;
  50.  
  51. end
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.